from django.shortcuts import render
from django.http import HttpResponse
from paper.models import Question,QuestionType,Choice,Answer
# Create your views here.

def clickpaper(request):
    return HttpResponse('选择目录')

def click_single(request):
    q_type = QuestionType.objects.get(question_type = '单选题')
    question_list = q_type.question_set.all()

    context = {'question_list':question_list}
    return render(request,'clickpaper/single.html',context)
